<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'基本资料','search'=>'N'))}
	<div class="operate panel panel-default">
		<div class="panel-body">
			<div class="pull-right">
				<a onclick="save()"  class="btn btn-sm btn-primary">保存</a>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-xs-12">
			<form id="form_data" name="form_data" method="post" class="form-horizontal">
				<input type="hidden" name="id" id="id"  value="{$vo.id}">
				<input type="hidden" name="pic" id="pic" value="{$vo.pic}">
				<input type="hidden" name="ajax" id="ajax" value="0">
				<input type="hidden" name="opmode" id="opmode" value="">
				<table class="table table-bordered" >
					<tr>
						<th class="col-10">
						<nobr>
							员工编号
						</nobr></th>
						<td colspan="2" class="col-30">
						<p class="form-control-static">
							{$vo.emp_no}
						</p></td>
						<td rowspan="3" class="col-20"><img class="img-thumbnail col-12" id="emp_pic" src="__ROOT__/{$vo.id|get_emp_pic}?t={:time()}" onerror="javascript:this.src='/Uploads/emp_pic/no_avatar.jpg'"></td>
					</tr>
					<tr>
						<th>姓名</th>
						<td colspan="2">
						<p class="form-control-static">
							{$vo.name}
						</p></td>
					</tr>
					<tr>
						<th>性别</th>
						<td colspan="2">
						<select name="sex" id="sex" class="form-control col-10">
							<option  value="male">男</option>
							<option value="female">女</option>
						</select></td>
					</tr>
					<tr>
						<th>生日</th>
						<td colspan="2">
						<input type="text" id="birthday" name="birthday" readonly="readonly" class="input-date form-control" value="{$vo.birthday}">
						</td>
						<td colspan="2"><a onclick="select_avatar();" class="btn btn-sm btn-primary">上传头像</a></td>
					</tr>
					<tr>
						<th>部门*</th>
						<td class="col-20">
						<p class="form-control-static">
							{$vo.dept_name}
						</p></td>
						<th class="col-10">职位</th>
						<td>
						<p class="form-control-static">
							{$vo.position_name}
					
						</p></td>
					</tr>
					<tr>
						<th>
						<nobr>
							办公室电话
						</nobr></th>
						<td>
						<input type="text" id="office_tel" name="office_tel" class="form-control" value="{$vo.office_tel}">
						</td>
						<th>
						<nobr>
							移动电话
						</nobr></th>
						<td>
						<input type="text" id="mobile_tel" name="mobile_tel" class="form-control" value="{$vo.mobile_tel}">
						</td>
					</tr>
					<tr>
					<tr>
						<th>电子邮箱</th>
						<td colspan="3">
						<p class="form-control-static">
							{$vo.email}
						</p></td>
					</tr>
					<tr>
						<th>
						<nobr>
							负责业务
						</nobr></th>
						<td colspan="3">
						<input type="text" id="duty" name="duty" class="form-control" value="{$vo.duty}">
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		function reset_pwd() {
		winopen("{:U('password')}",560, 470);
		}
		function select_avatar() {
		winopen("{:U('popup/avatar')}?id="+$("#id").val(),560, 470);
		}
		function save() {
			sendForm("form_data","{:U('save')}","{:U('index')}");
		}
		$(document).ready(function() {
		set_return_url();
		set_val('sex','{$vo.sex}');
		});
	</script>

</block>